import { useToggle } from '@vueuse/core'
import { TreeOption } from 'naive-ui'
import { Key } from 'naive-ui/es/tree/src/interface'
import { defineStore } from 'pinia'
import { Component, reactive } from 'vue'
import { computed, ref } from 'vue'

export const useEarthStore = defineStore('earth', () => {
    const tooltype = ref('')
    const pannellist = ref<Record<string, { name: Component|String,options: any }>>({})
    const stausbarshow = ref(true)
    const timebarshow = ref(false)
    const eagleviewshow = ref(false)
    const splitScreenShow = ref(true)
    const timeline_arr = ref([] as string[])
    const timeline_arr_kv = ref({})
    const showTimeLine = ref(false)
    const timelinetime = ref('')
    const resultlistviewshowindex = ref(-1)
    const resultlisttimelineshowindex = ref(-1)
    const resultlistsplitshowindex = ref(-1)


    const panoramaurl = ref('')
    const showPanorama = ref(false)
    
    const taskws = reactive({
      data: {}
    })


    return {
        tooltype,
        panoramaurl,
        showPanorama,
        pannellist,
        stausbarshow,
        eagleviewshow,
        timebarshow,
        splitScreenShow,
        timeline_arr,
        timeline_arr_kv,
        resultlistviewshowindex,
        resultlisttimelineshowindex,
        resultlistsplitshowindex,
        timelinetime,
        showTimeLine,
        taskws,
    }
})
